<template>
	<div id="app">
		<router-view v-if="showPage"></router-view>
	</div>
</template>

<script>
import { mapState } from 'vuex'
import util from '@/libs/util.js'
export default {
  name: 'app',
  computed: {
    ...mapState('d2admin/permission', ['isShow']),

    showPage () { // 是否显示页面（目的：保证先加载完权限再显示页面）
      let show = true
      const token = util.cookies.get('token')
      if (token && token !== 'undefined' && token !== 'null') {
        show = this.isShow
      }
      return show
    }
  }
}
</script>

<style lang="scss">
@import '~@/assets/style/public-class.scss';
</style>
